import React, { createElement } from 'react';
import classNames from 'classnames';
import { List } from 'antd';
import styles from './style.less';

/**
 * @author Jimmery
 * @date 2018/08/28
 * @param {*} param0 
 */
const ListDetailPage = ({ className, title, data, ...rest }) => {
    return (
        <List
            header={<div>{title}</div>}
            bordered
            dataSource={data}
            renderItem={item => (
                <List.Item key={item.key}>
                    <div className="listTitle">
                        {item.title}
                    </div>
                    <div className="listContent can-wrap">
                        {item.content}
                    </div>
                </List.Item>
            )}
            />
    ) 
}

export default ListDetailPage;
